import React, { Component, PropTypes } from 'react';
import { connect } from 'dva';
import { Link } from 'dva/router';
import UserForm from '../components/UserGroup/UserForm';
import TableList from '../components/TableList';
import styles from './UserGroup.less';
import MainLayout from '../components/MainLayout/MainLayout';
import {Row, Col,Tooltip,Icon,Form, Input, Select, Checkbox, Radio,Cascader} from 'antd';

class UserGroup extends React.Component{
	  constructor(props){
	    super(props);
	  }

	  componentWillMount() {
	  	//userListByGroup
	 };
	render(){
		// const { getFieldDecorator } = this.props.form;
	  return (
	    <MainLayout isShowLeft="showGroup">
		    <div className={styles.wrap}>
		      <Row type="flex" justify="space-between" gutter={16} className="top_tit">
			      <Col span={8}>
			      	<a href="#">生命周期</a>
			      </Col>
			      <Col span={8}>
			      <Link to="/MemberLevel">会员等级</Link>
			      	
			      </Col>
			      <Col span={8}>
			      	<Link to="/UserGroup" className="on">自定义用户组</Link>
			      </Col>
			    </Row>
			    <div className={styles.ui_wrap}>
			    	<h3 className={styles.ui_tit}>
			    		用户群组&nbsp;
			    		<Tooltip placement="right" title="用户群组是指根据用户标签组合筛选出的特定的人群用户">
				          <Icon type="question-circle-o" className={styles.anticon}/>
				        </Tooltip>
			    	</h3>
			    	<div className={styles.chart_box}>
			    		<Row>
					      <Col span={12}>
					      	<UserForm />
					      </Col>
					      <Col span={12}>
					      	<TableList pageSize={10} groupInfo={"true"} />
					      </Col>
					    </Row>
			    	</div>
			    </div>
		    </div>
	    </MainLayout>
	  );
	}
}

function mapStateToProps({ homePage }) {
  return {
    homePage: {...homePage},
  };
}

export default connect(mapStateToProps)(UserGroup);